import { createRouter, createWebHashHistory } from "vue-router";

const routes = [
  {
    path: "/",
    name: "Home",
    component: () => import('@/views/Admin'),
  },
  {
    path: "/contact",
    name: "Contact",
    component: () => import('@/views/Contact'),
  },
  {
    path: "/article",
    name: "Article",
    component: () => import('@/views/Article'),
  },
  {
    path: "/article/create",
    name: "ArticleCreate",
    component: () => import('@/views/ArticleCreate'),
  },
  {
    path: "/article/:id/update",
    name: "ArticleUpdate",
    component: () => import('@/views/ArticleUpdate'),
  },
  {
    path: "/article/:id",
    name: "ArticleShow",
    component: () => import('@/views/ArticleShow'),
  },
  {
    path: "/about",
    name: "About",
    component: () => import("../views/About.vue"),
  },
];

const router = createRouter({
  history: createWebHashHistory(),
  routes,
});

export default router;
